package com.ccrfid.rmc6.entity.device;

import com.ccrfid.rmc6.appconfig.jackson.CustomDouble2Serialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vividsolutions.jts.geom.Point;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
public class UntreatedCardDto {
    private Long id;
    private Long uid;
    private String sn;
    private Long cardNumber;
    private Integer cardType;
    private String cardTypeName;
    private Integer onlineStatus;
    private Integer cutoffStatus;
    private Integer lowpowerStatus;
    private Integer isEnabled;
    @JsonSerialize(using = CustomDouble2Serialize.class)
    private Double battery;
    private Integer heartRate;
    private Integer firmwareVersion;

    private Long personnelId;
    private String personnelName;
    private String nameAcronym;
    private String personnelSn;
    private String idNumber;
    private Integer personnelType;
    private String personnelTypeName;
    private Long orgId;
    private String orgName;
    private Integer gender;

    private Long assetId;
    private String assetName;
    private String assetSn;

    private Integer bindStatus;

    private Integer locatorAddress;
    private Point pos;
    private Integer floorNumber;
    private Timestamp updateTime;

    @Id
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }


    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public Long getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(Long cardNumber) {
        this.cardNumber = cardNumber;
    }

    public Integer getCardType() {
        return cardType;
    }

    public void setCardType(Integer cardType) {
        this.cardType = cardType;
    }

    public String getCardTypeName() {
        return cardTypeName;
    }

    public void setCardTypeName(String cardTypeName) {
        this.cardTypeName = cardTypeName;
    }

    public Integer getOnlineStatus() {
        return onlineStatus;
    }

    public void setOnlineStatus(Integer onlineStatus) {
        this.onlineStatus = onlineStatus;
    }

    public Integer getCutoffStatus() {
        return cutoffStatus;
    }

    public void setCutoffStatus(Integer cutoffStatus) {
        this.cutoffStatus = cutoffStatus;
    }

    public Integer getLowpowerStatus() {
        return lowpowerStatus;
    }

    public void setLowpowerStatus(Integer lowpowerStatus) {
        this.lowpowerStatus = lowpowerStatus;
    }

    public Integer getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(Integer isEnabled) {
        this.isEnabled = isEnabled;
    }

    public Double getBattery() {
        return battery;
    }

    public void setBattery(Double battery) {
        this.battery = battery;
    }

    public Integer getHeartRate() {
        return heartRate;
    }

    public void setHeartRate(Integer heartRate) {
        this.heartRate = heartRate;
    }

    public Integer getFirmwareVersion() {
        return firmwareVersion;
    }

    public void setFirmwareVersion(Integer firmwareVersion) {
        this.firmwareVersion = firmwareVersion;
    }

    public Long getPersonnelId() {
        return personnelId;
    }

    public void setPersonnelId(Long personnelId) {
        this.personnelId = personnelId;
    }

    public String getPersonnelName() {
        return personnelName;
    }

    public void setPersonnelName(String personnelName) {
        this.personnelName = personnelName;
    }

    public String getNameAcronym() {
        return nameAcronym;
    }

    public void setNameAcronym(String nameAcronym) {
        this.nameAcronym = nameAcronym;
    }

    public String getPersonnelSn() {
        return personnelSn;
    }

    public void setPersonnelSn(String personnelSn) {
        this.personnelSn = personnelSn;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public Integer getPersonnelType() {
        return personnelType;
    }

    public void setPersonnelType(Integer personnelType) {
        this.personnelType = personnelType;
    }

    public String getPersonnelTypeName() {
        return personnelTypeName;
    }

    public void setPersonnelTypeName(String personnelTypeName) {
        this.personnelTypeName = personnelTypeName;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Long getAssetId() {
        return assetId;
    }

    public void setAssetId(Long assetId) {
        this.assetId = assetId;
    }

    public String getAssetName() {
        return assetName;
    }

    public void setAssetName(String assetName) {
        this.assetName = assetName;
    }

    public String getAssetSn() {
        return assetSn;
    }

    public void setAssetSn(String assetSn) {
        this.assetSn = assetSn;
    }

    public Integer getBindStatus() {
        return bindStatus;
    }

    public void setBindStatus(Integer bindStatus) {
        this.bindStatus = bindStatus;
    }

    public Integer getLocatorAddress() {
        return locatorAddress;
    }

    public void setLocatorAddress(Integer locatorAddress) {
        this.locatorAddress = locatorAddress;
    }

    @Type(type = "jts_geometry")
    public Point getPos() {
        return pos;
    }

    public void setPos(Point pos) {
        this.pos = pos;
    }

    public Integer getFloorNumber() {
        return floorNumber;
    }

    public void setFloorNumber(Integer floorNumber) {
        this.floorNumber = floorNumber;
    }

    @UpdateTimestamp
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
}
